1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, and more particularly, to an image processing apparatus and image processing method which detect an alteration position in a captured image.
2. Description of the Related Art
There have been proposed the following techniques of detecting alterations in the images captured by compact digital cameras, single-lens reflex digital cameras, and the like. These techniques are designed to detect alteration by analyzing a pattern originally included in a captured image or comparing the feature amounts of the respective regions without embedding any additional information such as a digital watermark in the captured image. The techniques do not embed any additional information such as a digital watermark, and hence have a merit that they can detect alteration without degrading the image quality of a captured image or increasing the processing time due to embedding of additional information.
Ahmet Emir Dirik, Nasir Memon, “IMAGE TAMPER DETECTION BASED ON DEMOSAICING ARTIFACTS” ICIP 2009, pp. 1497-1500 (literature 1) is designed to estimate and analyze the color filter array (CFA) pattern of the image sensor of a camera such as a CMOS sensor or CCD (Charge-Coupled Device) from a captured image and use the pattern for the detection of alteration. A CFA is, for example, an RGB color filter arrangement, and indicates the RGB light reception pattern of each cell (a unit corresponding to a pixel of an image) of the image sensor. Many image sensors on the market are configured to make each cell acquire any one of the pieces of RGB color information for the sake of reducing costs. An image sensor uses a CFA typified by a Bayer arrangement to efficiently acquire color information, and acquires color information from incident light. A CFA has cells regularly and periodically arranged on an image sensor with, for example, a square arrangement of 2×2 cells being a unit.
Each pixel of an image generated by an image sensor (to be referred to as a “RAW image” hereinafter) has only one of the pieces of RGB color information. In order to generate a full color image with each pixel having all pieces of RGB color information, it is necessary to perform demosaicing processing for a RAW image. Demosaicing processing interpolates color information missing in each pixel from neighboring pixels by linear interpolation such as bilinear interpolation.
For example, copying a region of another image to an alteration target image (to be referred to as an “external copy” hereinafter) will mix the CFA pattern of the other image with that of the target image at an alteration position. As a result, the periodic CFA pattern is disrupted at the alteration position in the altered image. The technique in literature 1 is designed to detect alteration by estimating the CFA pattern of an image sensor from a full color image and detecting a position where the periodicity of the CFA pattern is disturbed.
In addition, some alteration is made in such a manner that a partial region of an alteration target image is copied to another region in the image (to be referred to as an “internal copy” hereinafter). According to the internal copy, the feature amount of a partial copy-source region matches that of a partial copy-destination region. The technique disclosed in Alin C. Popescu, Hany Farid, “Exposing Digital Forgeries by Detecting Duplicated Image Regions”, TR2004-515, Dartmouth College, Computer Science (literature 2) detects alteration by extracting a feature amount for each partial region (for example, each 32×32 pixel region) in a captured image by principal component analysis and detecting a region pair (copy pair) whose feature amounts match each other within the same image.
With the technique in literature 1, it is possible to detect alteration by the external copy, but it is difficult to detect alteration by the internal copy, by which a CFA pattern is not easily disrupted. In contrast, the technique in literature 2 can detect alteration by the internal copy but cannot detect any alteration by the external copy, by which the feature amounts of the respective regions do not match each other. Therefore, in order to detect both alteration by the internal copy and alteration by the external copy, it is effective to use a combination of the technique using CFA patterns and the technique using the feature amounts of partial regions.
When a CFA pattern is used, a captured image is divided into relatively large blocks each constituted by, for example, 64×64 pixels, and alteration is detected by estimating a CFA pattern for each block. For this reason, although this technique detects alteration, it cannot detect the shape of the altered region and can detect only an approximate alteration position at most. In contrast to this, it is possible to also detect the shape of an altered region using the feature amounts of small partial regions.
However, the processing using the feature amount of a partial region of 32×32 pixels requires a processing time about 100 times longer than that when using the CFA pattern of a block constituted by 64×64 pixels. That is, alteration detection based on the combination of the technique using CFA patterns and the technique using the feature amounts of partial regions strongly depends on the processing time of the technique using the feature amounts of partial regions, and requires a long period of time.